package cn.tedu;

import java.util.ArrayList;
import java.util.Arrays;

public class Test2 {
    public static void main(String[] args) {
        ArrayList a=new ArrayList();
        a.add(51);
        a.add(8);
        a.add(6);
        a.add(8);
        a.add(1,99);
        System.out.println(a.isEmpty());
        a.remove(new Integer(51));
        a.remove(1);
        System.out.println(a.indexOf(8));
        System.out.println(a.lastIndexOf(8));
        System.out.println(a.contains(0));
        System.out.println(a.set(2,888));
        System.out.println(a.get(1));
        System.out.println(a.subList(1,3));

        ArrayList l=new ArrayList();
        Object[] o=new Object[l.size()];
        for (int i = 0; i < o.length; i++) {
            o[i]=l.get(i);
        }
        System.out.println(Arrays.toString(o));


    }
}
